﻿<Window x:Class="TorchView.SharedStashEditor.Views.EditEffectView" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="Edit Effect:" 
        WindowStartupLocation="CenterScreen" 
        Style="{StaticResource DialogWindowStyle}">

    <Grid Margin="7">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Vertical" Grid.Row="0" Grid.ColumnSpan="2" Margin="0,7" Width="200">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <Label Grid.Row="0" Grid.Column="0" Target="{Binding ElementName=EffectName}" Foreground="{StaticResource HighlightedTextBrush}">Name:</Label>
                <TextBox Grid.Row="0" Grid.Column="1" Name="EffectName" Text="{Binding effect.Name}"></TextBox>
                
                <Label Grid.Row="1" Grid.Column="0" Target="{Binding ElementName=EffectName}" Foreground="{StaticResource HighlightedTextBrush}">Damage Type:</Label>
                <ComboBox Grid.Row="1" Grid.Column="1" Name="EffectDamageType" ItemsSource="{Binding DamageSourceTypes}" SelectedItem="{Binding effect.DamageType}" />

                <Label Grid.Row="2" Grid.Column="0" Target="{Binding ElementName=EffectDuration}" Foreground="{StaticResource HighlightedTextBrush}">Duration:</Label>
                <TextBox Grid.Row="2" Grid.Column="1" Name="EffectDuration" Text="{Binding effect.Duration}"></TextBox>

                <Label Grid.Row="3" Grid.Column="0" Target="{Binding ElementName=EffectBonus}" Foreground="{StaticResource HighlightedTextBrush}">Bonus:</Label>
                <TextBox Grid.Row="3" Grid.Column="1" Name="EffectBonus" Text="{Binding effect.Bonus}"></TextBox>

                <Label Grid.Row="4" Grid.Column="0" Target="{Binding ElementName=EffectRangeMin}" Foreground="{StaticResource HighlightedTextBrush}">Range Min:</Label>
                <TextBox Grid.Row="4" Grid.Column="1" Name="EffectRangeMin" Text="{Binding effect.RangeMin}"></TextBox>

                <Label Grid.Row="5" Grid.Column="0" Target="{Binding ElementName=EffectRangeMax}" Foreground="{StaticResource HighlightedTextBrush}">Range Max:</Label>
                <TextBox Grid.Row="5" Grid.Column="1" Name="EffectRangeMax" Text="{Binding effect.RangeMax}"></TextBox>

                <Label Grid.Row="6" Grid.Column="0" Target="{Binding ElementName=EffectPctMin}" Foreground="{StaticResource HighlightedTextBrush}">PctMin:</Label>
                <TextBox Grid.Row="6" Grid.Column="1" Name="EffectPctMin" Text="{Binding effect.PctMin}"></TextBox>

                <Label Grid.Row="7" Grid.Column="0" Target="{Binding ElementName=EffectPctMax}" Foreground="{StaticResource HighlightedTextBrush}">PctMax:</Label>
                <TextBox Grid.Row="7" Grid.Column="1" Name="EffectPctMax" Text="{Binding effect.PctMax}"></TextBox>
            </Grid>
        </StackPanel>
        <Button Grid.Row="2" HorizontalAlignment="Right" Content="OK" IsDefault="True" Command="{Binding OKCommand}" Margin="7,0" />
        <Button Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Content="Cancel" IsCancel="True" />
    </Grid>
</Window>
